import login from '@/pages/login/login'
import index from '@/pages/index'
import HomeIndex from '@/pages/home/index'
import UserList from '@/pages/home/users/userlist'
import Userlog from '@/pages/home/users/userlog'



export default [{
        path: '/',
        redirect: "/login",
    },

    {
        path: '/login',
        name: '登录',
        component: login,
    },
    {
        path: '*',
        redirect: '/'
    },
    {
        path: '/home',
        name: '展示页',
        component: index,
        children: [{
            path: '/home', //嵌套首页用的
            name: '',
            component: HomeIndex,
        }]
    },
    {
        path: '/home',
        name: '首页',
        icon: "iconfont iconhome",

        component: index,
    },
    {
        name: "用户管理",
        path: '/user',
        component: index,
        meta: { keepAlive: false, navShow: false },
        icon: "iconfont iconusermanage",
        children: [{
            path: '/user/list',
            name: '用户列表',
            component: UserList,
            meta: { isMenu: true },
        }, {
            path: '/user/log',
            name: '用户登录日志',
            meta: { keepAlive: true, isMenu: true },
            component: Userlog,
        }]
    },
    {
        path: '/power',
        name: '权限管理',
        icon: "iconfont iconquanxian",
        component: index,
        children: [{
                path: '/power/role',
                name: '角色列表',
                meta: { keepAlive: true, isMenu: true },
                component: resolve => require(["@/pages/home/power/role"], resolve)
            },
            {
                path: '/power/admin',
                name: '管理员',
                meta: { keepAlive: true, isMenu: true },
                component: resolve => require(["@/pages/home/power/admin"], resolve)
            }
        ]

    },
    {
        path: '/version',
        name: '版本上传',
        icon: "iconfont iconthird",
        component: index,
        children: [{
            path: '/version/index',
            name: '前端文件版本上传',
            meta: { keepAlive: true, isMenu: true }, //判断是否显示在左侧菜单
            component: resolve => require(["@/pages/version/index"], resolve)
        }, {
            path: '/version/details',
            name: '文件详情',
            meta: { keepAlive: false, isMenu: false },
            component: resolve => require(["@/pages/version/details"], resolve)
        }, ]
    },


]